cmake_minimum_required(VERSION 3.1)

project(LVGL)

include_directories(.)
include_directories(./UI)
include_directories(objj)

add_subdirectory(lvgl)
add_subdirectory(lv_drivers)
add_subdirectory(./UI)

set(TOOLCHAIN_DIR "/usr/local/arm/5.4.0/usr/")
set(CMAKE_C_COMPILER "${TOOLCHAIN_DIR}/bin/arm-linux-gcc")
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_DIR}/bin/arm-linux-g++")

SET(cmake_C_FLAGS "-Wl,-rpath=/IOT")

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build)

#add_executable(${PROJECT_NAME} main.c mouse_cursor_icon.c)
# 自动收集 objj 目录下的所有 .c 文件
file(GLOB OBJ_SOUTCES "objj/*.c")
add_executable(${PROJECT_NAME} main.c mouse_cursor_icon.c zzd.c fz.c www.c ${OBJ_SOUTCES})
target_link_libraries(${PROJECT_NAME} PRIVATE lvgl lvgl::examples lvgl::demos lvgl::drivers)
target_link_libraries(${PROJECT_NAME} PRIVATE ui)